Skip to content

Conversation

scorebreaker
Copy link
Contributor

Implement Overview design.

@BitcoinOG BitcoinOG requested a review from stackingcats March 30, 2021 09:39
Copy link
Collaborator

@stackingcats stackingcats left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Starting to look good, thanks!
Some changes required, though.

!status.status.includes("light mode") && status.status !== "Disabled"
);
const getStatusIcon = (status: Status) => {
if (status.status.includes("Ready")) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isServiceReady() would give a more accurate answer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

})
);
const getCardHeaderBackgroundImage = (props: OverviewItemProps) => {
if (props.status.status.includes("Ready")) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isServiceReady() would give a more accurate answer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

);
};

const isDownloadLogsEnabled = (status: Status): boolean => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By moving the Download Logs button inside the expanded view, there is a problem. As the expanded view is only visible when opendexd is up and running (since the information displayed is not available otherwise), the logs should still be available, no matter what the opendexd status is. Also, the logs should be available for any service that has a container, even if there's no additional information. The easiest solution would be to leave the Download Logs button in the main view. Otherwise in some cases the view should be expanded just to see the Download Logs button which is bizarre.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved it back to the main view.

</div>
)}
<ButtonBase onClick={handleClose}>
<img src={expandIcon} alt="expand" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of the expand icon, there should be the "opposite" icon that indicates the collapse.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment on lines +83 to +88
<div className={classes.copyContainer}>
<ButtonBase onClick={() => copyToClipboard(value)}>
<img src={copyIcon} alt="copy" className={classes.copyIcon} />
Copy
</ButtonBase>
</div>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The icon seems a bit off in two ways:

  1. When the ripple effect appears on click, there's no padding / no space around the text and icon;
  2. On the right of the icon, there's too much space. Would be good to give the content column (middle) more space.

import { copyToClipboard } from "../../utils/appUtil";
import IconButton from "../input/buttons/IconButton";
import { copyIcon } from "../../../common/utils/svgIcons";
import ButtonBase from "@material-ui/core/ButtonBase";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are button components in this project. Let's just use them in order to handle consistent style throughout the project.

import Dialog from "@material-ui/core/Dialog";
import DialogContent from "@material-ui/core/DialogContent";
import { downloadIcon, expandIcon } from "../../common/utils/svgIcons";
import ButtonBase from "@material-ui/core/ButtonBase";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here regarding the custom button components.

import { formatDateTimeForFilename } from "../../common/utils/dateUtil";
import api from "../../api";
import DialogTitle from "@material-ui/core/DialogTitle";
import Dialog from "@material-ui/core/Dialog";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's also a Dialog component in this project. Would really make it lot easier to maintain to use this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found it very annoying if I want to design the dialog title part then I will have to give like 3 classes as props, is it necessary to have internal Dialog component?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be an option to give the title as an input instead?

<div>
<div className={classes.headingContainer}>
<h1 className={classes.heading}>Overview</h1>
<Icon
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please let's hide it until it has a functionality. Just some false condition here would do it.
Also, thinking of other views, they also need it so would not make sense to keep it in the Overview component but a PageTitleComponent or so would be meaningful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created PageTitle component for it.

…gs back outside Overview item, use collapse icon instead of expand, created PageTitle component to be reusable with all views
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants